home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / networking / amitcp / amislate1.0.lha / AmiSlate1.0 / SlateRexx / explode.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-03-13  |  664 b   |  35 lines

  1. /* An Arexx script for use with AmiSlate:  
  2.  
  3.      Makes a explosion-type thing on the screen.
  4.    
  5. */
  6. parse arg CommandPort ActiveString
  7.  
  8. address (CommandPort)
  9. options results
  10.  
  11. GetWindowAttrs stem win.
  12.  
  13. MaxX = (win.width - 59)
  14. MaxY = (win.height - 54)
  15.  
  16. HalfMaxX = trunc(MaxX/2)
  17. HalfMaxY = trunc(MaxY/2)
  18.  
  19. /* Calculate center of drawing area */
  20. mx = trunc((win.width-58)/2)
  21. my = trunc((win.height-53)/2)
  22.  
  23. NumberOfLines = 300
  24.  
  25. do while (NumberOfLines > 0)
  26.     x = mx + rand(MaxX) - HalfMaxX
  27.     y = my + rand(MaxY) - HalfMaxY
  28.     
  29.     line mx my x y
  30.     setfcolor rand(15) rand(15) rand(15) notbackground
  31.     NumberOfLines = NumberOfLines - 1
  32. end
  33.  
  34. rand:
  35.     return trunc(Random()*arg(1)/1000)